package com.caigp.cookbook2.util;

import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;

public class HttpClient {

    private static OkHttpClient okHttpClient = new OkHttpClient();

    public static void sendPost(String url, RequestBody requestBody, Callback callback) {
        Request request = new Request.Builder()
                .post(requestBody)
                .url(url)
                .build();
        okHttpClient.newCall(request).enqueue(callback);
    }
}
